Termination w.r.t. Q of the following Term Rewriting System could be disproven:
Q restricted rewrite system:
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
Q is empty.
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
Q is empty.
Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(f, 0), n) → APP(map, f)
APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
APP(app(f, 0), n) → APP(hd, app(app(map, f), app(app(cons, 0), nil)))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(app(f, 0), n) → APP(cons, 0)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(f, 0), n) → APP(map, f)
APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
APP(app(f, 0), n) → APP(hd, app(app(map, f), app(app(cons, 0), nil)))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(app(f, 0), n) → APP(cons, 0)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 4 less nodes.
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
Q DP problem:
The TRS P consists of the following rules:
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n) at position [0,1] we obtained the following new rules:
APP(app(y0, 0), y1) → APP(app(hd, app(app(map, y0), app(app(hd, app(app(map, cons), app(app(cons, 0), nil))), nil))), y1)
APP(app(0, 0), y1) → APP(app(hd, app(app(hd, app(app(map, map), app(app(cons, 0), nil))), app(app(cons, 0), nil))), y1)
APP(app(x0, 0), y1) → APP(app(hd, app(app(cons, app(x0, 0)), app(app(map, x0), nil))), y1)
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ QDP
↳ Narrowing
↳ QDP
↳ NonTerminationProof
Q DP problem:
The TRS P consists of the following rules:
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(y0, 0), y1) → APP(app(hd, app(app(map, y0), app(app(hd, app(app(map, cons), app(app(cons, 0), nil))), nil))), y1)
APP(app(0, 0), y1) → APP(app(hd, app(app(hd, app(app(map, map), app(app(cons, 0), nil))), app(app(cons, 0), nil))), y1)
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(x0, 0), y1) → APP(app(hd, app(app(cons, app(x0, 0)), app(app(map, x0), nil))), y1)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.
The TRS P consists of the following rules:
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(y0, 0), y1) → APP(app(hd, app(app(map, y0), app(app(hd, app(app(map, cons), app(app(cons, 0), nil))), nil))), y1)
APP(app(0, 0), y1) → APP(app(hd, app(app(hd, app(app(map, map), app(app(cons, 0), nil))), app(app(cons, 0), nil))), y1)
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(x0, 0), y1) → APP(app(hd, app(app(cons, app(x0, 0)), app(app(map, x0), nil))), y1)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
The TRS R consists of the following rules:
app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))
s = APP(app(f, 0), n) evaluates to t =APP(app(cons, 0), nil)
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [n / nil, f / cons]
Rewriting sequence
The DP semiunifies directly so there is only one rewrite step from APP(app(f, 0), n) to APP(app(cons, 0), nil).